<template>
  <div>
    <CategorySelector :disabled="isShow !== 1" />
    <!-- 因为这里是公共组件所以加了 -->
    <SpuList v-if="isShow === 1" @setIsShow="isShow = $event" />
    <addOrUpDateList v-else-if="isShow === 2" @setIsShow="isShow = $event" />
    <addSku v-else @setIsShow="isShow = $event" />
  </div>
</template>

<script lang="ts">
export default {
  name: "LSpu",
};
</script>

<script lang="ts" setup>
import { ref } from "vue";
import CategorySelector from "@/components/CategorySelector/index.vue";
import SpuList from "./components/spu-list.vue";
import addOrUpDateList from "./components/addOrUpdateList.vue";
import addSku from "./components/addSku.vue";
/*
 SpuList: 1
 addOrUpDateList:2
 addSku:3
*/
const isShow = ref(1);
</script>

<style scoped></style>
